//
//  TopBar.swift
//  MyCookbook
//
//  Created by liaokylin on 2024/10/15.
//

import SwiftUI

struct TopBar: View {
    @Binding var isDrawerVisible:Bool
    @State private var searchKey:String = ""
    @State private var searchButton:String = ""

    var body: some View {
            HStack{
                Image(systemName:"line.3.horizontal")
                    .onTapGesture {
                        isDrawerVisible.toggle()
                    }
                SearchBar(searchKey:$searchKey, searchButton: $searchButton)
      
                Image(systemName:"bell")
                
            }.padding(.horizontal,10)
    }
}

#Preview {
   // TopBar(isDrawerVisible: .constant(false))
}
